package
{
	import flash.net.URLRequest;
	
	import mx.containers.Canvas;
	import mx.controls.Image;
	import mx.controls.Label;
	
	import org.bytearray.gif.player.GIFPlayer;

	public class loading extends Canvas
	{
		private var img:Image;
		private var gifPlay:GIFPlayer=new GIFPlayer();
		private var lab:Label;
		
		public function loading()
		{
			super();
			
			this.percentHeight = 100;
			this.percentWidth = 100;
			this.setStyle("backgroundAlpha",0.8);
			this.setStyle("backgroundColor","#FFFFFF");
			img = new Image();
			gifPlay = new GIFPlayer();
			this.lab = new Label();
			this.lab.text = '初始化......';
			this.lab.width = 200;
			this.lab.setStyle("textAlign","center");
		}
		public function mylbild():void{
			var req:URLRequest =  new URLRequest("1G.gif");  
            gifPlay.load(req); 
            img.addChild(gifPlay);
			//img.x = 490;
			//img.y = 400;
			img.setStyle('horizontalCenter', '0');
			img.setStyle('verticalCenter', '0');
			this.addChild(img);
			//this.lab.x = 410;
			//this.lab.y = 450;
			//this.addChild(lab);
		}
		
		public function setLab(value:String):void{
			this.lab.text = value;
			
		}
		
	}
}